package com.auto.oa.menu.dao.impl;

import java.util.List;
import java.util.Map;

import com.system.common.Page;
import com.auto.oa.menu.domain.OaMenuInfo;
import com.auto.oa.menu.domain.OaMenuInfoExtend;
import com.auto.oa.menu.dao.IOaMenuInfoDAO;
import com.system.util.PersistUtil;
import com.auto.oa.menu.sql.sqlid.OaMenuInfoSqlID;
/**
 * : t_auto_oa_menu_info
 * 
 * 
 * @author Gen
 */
public class OaMenuInfoDAOImpl implements IOaMenuInfoDAO{

	public OaMenuInfo insertOaMenuInfo(OaMenuInfo bean){
		return PersistUtil.insert(bean, OaMenuInfoSqlID.INSERT);
	}

	public boolean deleteOaMenuInfo(String apmeGuid){
		PersistUtil.delete(apmeGuid, OaMenuInfoSqlID.DELETE);
		return true;
	}	

	public OaMenuInfo updateOaMenuInfo(OaMenuInfo bean){
		return PersistUtil.update(bean, OaMenuInfoSqlID.UPDATE);
	}	

	public OaMenuInfo loadOaMenuInfo(String apmeGuid){
		return PersistUtil.query(new OaMenuInfo().getClass(), apmeGuid);
	}

	public List<OaMenuInfo> queryList(Map<String,Object> param,Page page){
		page.setCount(PersistUtil.countSpecial(param, OaMenuInfoSqlID.QUERY));
		return PersistUtil.querySpecial(param, OaMenuInfoSqlID.QUERY, page.getFullOrderBy(), page.getOffset(), page.getLimit());
	}
	
	public List<OaMenuInfo> queryList(Map<String,Object> param){
		return PersistUtil.queryList(OaMenuInfo.class, param);
	}

	public List<OaMenuInfoExtend> queryListOaMenuInfoExtend(Map<String, Object> param, Page page) {
		page.setCount(PersistUtil.countSpecial(param, OaMenuInfoSqlID.QUERY_MENU_INFO_EXTEND));
		return PersistUtil.querySpecial(param, OaMenuInfoSqlID.QUERY_MENU_INFO_EXTEND, page.getFullOrderBy(), page.getOffset(), page.getLimit());
	}
	
	public List<OaMenuInfoExtend> queryListOaMenuInfoExtend(Map<String, Object> param) {
		return PersistUtil.query(param, OaMenuInfoSqlID.QUERY_MENU_INFO_EXTEND);
	}

	public List<OaMenuInfoExtend> queryListOaMenuInfoUser(Map<String, Object> param) {
		return PersistUtil.query(param, OaMenuInfoSqlID.QUERY_MENU_INFO_USER);
	}

}
